<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div class=" blank4"></div>
<table width="100%" border="0" cellspacing="0" class="table_03" id="ds">
  <tr>
  <th width="4%" ><input type="checkbox" name="all" value="all" onclick="select_all(this.checked)"/></th>
  <th width="10%">任务编号</th>
  <th width="6%">保证金</th>
  <th width="6%">发布点</th>
  <th width="6%">追加点</th>
  <th width="8%">所属平台</th>
  <th width="6%">任务类型</th>
  <th width="6%">任务状态</th>
  <th width="6%">接手人</th>
  <th width="12%">创建时间</th>
  <th>操作</th>
 </tr>
 <c:choose>
<c:when test="${fn:length(page.items)<1}">
<tr align="center"><td colspan="6"><font color='red'>${page.noDataMSG}</font></td></tr>
</c:when>
<c:otherwise> 
<c:forEach var="item" items="${page.items}">
 <tr align="center">
  <td><input type="checkbox" name="ids" value="${item.id}"/></td>
  <td>${item.taskSn}</td>
  <td>${item.guaranty}</td>
  <td>${item.point}</td>
  <td>${item.rewardPoint}</td>
     <td>
  <c:choose>
  <c:when test="${item.platform==1}"><img src="${approot}/static/images/common/taobao.jpg"/></c:when>
  <c:when test="${item.platform==2}"><img src="${approot}/static/images/common/paipai.gif"/></c:when>
  <c:otherwise>未知</c:otherwise>
  </c:choose>
  </td>
  <td>
  <c:choose>
  <c:when test="${item.type==1}">实物</c:when>
  <c:when test="${item.type==2}">虚拟</c:when>
  <c:otherwise>未知</c:otherwise>
  </c:choose>
  </td>
 
  <td>
  <c:choose>
  <c:when test="${item.type==0}">未接手</c:when>
  <c:when test="${item.type==1}">进行中</c:when>
  <c:when test="${item.type==2}">已完成</c:when>
  <c:otherwise>未知</c:otherwise>
  </c:choose>
  </td>
   <td>
  <c:choose>
  <c:when test="${item.receiveUser==null}">无</c:when>
  <c:otherwise>${item.receiveUser.name}</c:otherwise>
  </c:choose>
  </td>
  <td><fmt:formatDate value="${item.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
  <td>
  <a href="#" onclick="showDetail('${approot}/${app}/admin/${entity}/detail/${item.id}','800','400','任务详情')" id="${item.id}">详情</a>
  <a href="#" onclick="return delete_item('${app}','${entity}','${item.id}','${approot}/${app}/admin/${entity}/list/menu/${parentId}/${pageSize}/${startIndex}')">删除</a>
  <a href="${approot}/${app}/admin/${entity}/toEdit/${item.id}">修改</a>
   </td>
 </tr>
 </c:forEach>
 </c:otherwise>
</c:choose>
</table>
<div id="detailDiv" style="display:none"></div>
<div class=" blank12"></div>
<%@ include file="/WEB-INF/jsp/front/task/inc/page.jsp"%>